import 'package:flutter/material.dart';

class DisplayNetworkApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final String appTitle = '';
    return MaterialApp(
      title: appTitle,
      theme: ThemeData(primarySwatch: Colors.red),
      home: DisplayNetworkAppPage(title: appTitle),
    );
  }
}

class DisplayNetworkAppPage extends StatefulWidget {
  final String title;

  DisplayNetworkAppPage({Key key, this.title}) : super(key: key);

  @override
  State<StatefulWidget> createState() => DisplayNetworkAppPageState();
}

class DisplayNetworkAppPageState extends State<DisplayNetworkAppPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Column(
        children: <Widget>[
          // jpg图片
          Image.network(
              'http://image.baidu.com/search/down?tn=download&word=download&ie=utf8&fr=detail&url=http%3A%2F%2Fpic.58pic.com%2F58pic%2F13%2F80%2F78%2F35V58PICrWD_1024.jpg&thumburl=http%3A%2F%2Fimg1.imgtn.bdimg.com%2Fit%2Fu%3D2569486047%2C3428433554%26fm%3D26%26gp%3D0.jpg'),
          // gif图片
          Image.network(
              'http://image.baidu.com/search/down?tn=download&word=download&ie=utf8&fr=detail&url=http%3A%2F%2Fww2.sinaimg.cn%2Flarge%2F85d77acdgw1f4h8u37kjmg20dw06w1kx.jpg&thumburl=http%3A%2F%2Fimg2.imgtn.bdimg.com%2Fit%2Fu%3D1321821052%2C2717370706%26fm%3D26%26gp%3D0.jpg')
        ],
      ),
    );
  }
}
